#include "Echoserver.hpp"

int main(int argc, char *argv[])
{
    if (argc < 2)
    {
        // 说明不是按照格式
        std::cerr << "Usage" << argv[0] << "is wrong!" << "\n";

        exit(1);
    }

    // std::string _serverip = argv[1];
    uint16_t _serverport = std::stoi(argv[1]);

    LOG::ENABLE_CONSOLE();
    std::unique_ptr<UDPServer> _udp_ser = std::make_unique<UDPServer>(_serverport);

    _udp_ser->Init();

    _udp_ser->Start();

    return 0;
}